Skip to content

feat(widget): multi-validator provider cards and validator selection fixes#547

Merged
petar-omni merged 1 commit into
mainfrom
fix/misc
Jun 25, 2026
Merged

feat(widget): multi-validator provider cards and validator selection fixes#547
petar-omni merged 1 commit into
mainfrom
fix/misc

Conversation

@petar-omni

@petar-omni petar-omni commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
  • Add multi-validator provider cards in dashboard earn details: show every selected validator with per-validator remove controls, a manage-validators entry point for multi-select yields, localized status labels, and theme-aligned preferred badge styling; remove the utila-specific dashboard validator section
  • Fix multi-select validator list pagination so "View all" appears and paginated loading works when only preferred validators are shown (separate expanded display from explicit load-more requests)
  • Stabilize browser test setup with a fixed mock response delay, disabled animations, and updated node polyfill plugin configuration (drop local patch)
  • Refresh workspace dependency catalog and lockfile for latest allowed build, test, React, and wallet tooling releases

Summary by CodeRabbit

  • New Features
    • Improved multi-select validator picker with compact chips, an “add validator” action, and optional per-validator removal.
    • Provider/reward selection cards now support multi-validator display with enhanced validator management and summary text.
  • Bug Fixes
    • Updated validator “view more”/pagination and empty-state behavior for more reliable browsing.
    • Provider name and status labels now reflect selected validators more consistently, including translated active/inactive states.
  • Chores
    • Refreshed dependency versions and improved test mocking/timing; disabled Motion animations in the test environment.

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3f679c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c917092-e9e7-4ee2-9e28-8f04ec416eb3

📥 Commits

Reviewing files that changed from the base of the PR and between 44b2841 and 3f679c0.

⛔ Files ignored due to path filters (7)
  • packages/examples/with-vite-bundled/public/vite.svg is excluded by !**/*.svg
  • packages/examples/with-vite-bundled/src/typescript.svg is excluded by !**/*.svg
  • packages/widget/src/assets/images/porto.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/bitgo.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/finoa.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/utila.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (39)
  • package.json
  • packages/widget/src/components/atoms/virtual-list/index.tsx
  • packages/widget/src/components/molecules/select-validator/index.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-formatters.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-model.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/styles.css.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-section.tsx
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-trigger.tsx
  • packages/widget/src/pages/details/earn-page/components/select-validator-section/select-validator-trigger.tsx
  • packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx
  • packages/widget/src/pages/details/earn-page/state/earn-page-context.tsx
  • packages/widget/src/pages/details/earn-page/styles.css.ts
  • packages/widget/src/translation/English/translations.json
  • packages/widget/src/translation/French/translations.json
  • packages/widget/tests/components/select-validator-section.test.tsx
  • packages/widget/tests/mocks/delay.ts
  • packages/widget/tests/mocks/external-api-handlers.ts
  • packages/widget/tests/mocks/handlers.ts
  • packages/widget/tests/mocks/legacy-api-handlers.ts
  • packages/widget/tests/mocks/yield-api-handlers.ts
  • packages/widget/tests/pages-dashboard/earn-details-model.test.tsx
  • packages/widget/tests/pages-dashboard/provider-selection-card.test.tsx
  • packages/widget/tests/use-cases/deep-links-flow/deep-links-flow.test.tsx
  • packages/widget/tests/use-cases/deep-links-flow/setup.ts
  • packages/widget/tests/use-cases/external-provider/setup.ts
  • packages/widget/tests/use-cases/gas-warning-flow/setup.ts
  • packages/widget/tests/use-cases/renders-initial-page.test.tsx
  • packages/widget/tests/use-cases/rwa-kyc-flow.test.tsx
  • packages/widget/tests/use-cases/select-opportunity.test.tsx
  • packages/widget/tests/use-cases/sk-wallet.test.tsx
  • packages/widget/tests/use-cases/staking-flow/setup.ts
  • packages/widget/tests/use-cases/staking-flow/staking-flow.test.tsx
  • packages/widget/tests/use-cases/trust-incentive-apy/setup.ts
  • packages/widget/tests/utils/setup.ts
  • packages/widget/vite/vite.config.base.ts
  • packages/widget/vite/vite.node-polyfills.ts
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (5)
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-trigger.tsx
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-section.tsx
  • packages/widget/src/pages/details/earn-page/state/earn-page-context.tsx
  • packages/widget/vite/vite.node-polyfills.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/styles.css.ts
✅ Files skipped from review due to trivial changes (5)
  • packages/widget/src/translation/English/translations.json
  • package.json
  • packages/widget/tests/mocks/delay.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-model.tsx
  • pnpm-workspace.yaml
🚧 Files skipped from review as they are similar to previous changes (27)
  • packages/widget/tests/mocks/handlers.ts
  • packages/widget/vite/vite.config.base.ts
  • packages/widget/tests/pages-dashboard/provider-selection-card.test.tsx
  • packages/widget/tests/utils/setup.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-formatters.ts
  • packages/widget/tests/mocks/legacy-api-handlers.ts
  • packages/widget/src/translation/French/translations.json
  • packages/widget/tests/use-cases/renders-initial-page.test.tsx
  • packages/widget/tests/use-cases/external-provider/setup.ts
  • packages/widget/tests/use-cases/sk-wallet.test.tsx
  • packages/widget/tests/use-cases/trust-incentive-apy/setup.ts
  • packages/widget/tests/use-cases/rwa-kyc-flow.test.tsx
  • packages/widget/tests/pages-dashboard/earn-details-model.test.tsx
  • packages/widget/tests/use-cases/staking-flow/setup.ts
  • packages/widget/src/pages/details/earn-page/styles.css.ts
  • packages/widget/tests/components/select-validator-section.test.tsx
  • packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx
  • packages/widget/tests/use-cases/deep-links-flow/setup.ts
  • packages/widget/tests/mocks/external-api-handlers.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts
  • packages/widget/tests/mocks/yield-api-handlers.ts
  • packages/widget/tests/use-cases/select-opportunity.test.tsx
  • packages/widget/src/pages/details/earn-page/components/select-validator-section/select-validator-trigger.tsx
  • packages/widget/src/components/atoms/virtual-list/index.tsx
  • packages/widget/src/components/molecules/select-validator/index.tsx
  • packages/widget/tests/use-cases/gas-warning-flow/setup.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx

📝 Walkthrough

Walkthrough

The PR updates multi-validator selection and provider display flows, changes related tests and mocks, and simplifies Vite polyfill wiring and workspace dependency versions.

Changes

Multi-validator selection UI

Layer / File(s) Summary
Data, status, and translations
packages/widget/src/components/atoms/virtual-list/index.tsx, packages/widget/src/pages-dashboard/overview/earn-details/earn-details-formatters.ts, packages/widget/src/pages-dashboard/overview/earn-details/earn-details-model.tsx, packages/widget/src/translation/*/translations.json
VirtualList removes its default generic, provider status formatting becomes translation-driven, selected provider names join all selected validators, and English/French translations add validator-management and plural summary strings.
SelectValidator view-more behavior
packages/widget/src/components/molecules/select-validator/index.tsx
SelectValidator splits the previous combined view-more behavior into requested-more and expanded-state flags, updates grouping and empty-state handling, adjusts memo dependencies, and changes next-page fetching to follow the requested-more flag.
Dashboard provider cards
packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx, packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts
ProviderSelectionCard normalizes provider and validator data into ProviderCardItem, renders ProviderCardsTrigger, and updates provider/status rendering, layout styles, and remove/manage actions for the multi-validator card flow.
Widget multi-select chips
packages/widget/src/pages/details/earn-page/components/select-validator-section/select-validator-trigger.tsx, packages/widget/src/pages/details/earn-page/styles.css.ts, packages/widget/src/pages-dashboard/overview/earn-page/styles.css.ts
SelectValidatorTrigger adds a multi-select chip branch with preferred icons, per-chip removal, and an add-validator trigger, while related styles add chip and badge classes and remove the older earn-page button/name helpers.
Yield strategy provider rendering
packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx, packages/widget/src/pages/details/earn-page/state/earn-page-context.tsx
SelectYieldRewardDetails builds per-strategy provider lists, gates strategy details by variant, refactors YieldStrategyDetails to accept provider arrays, renders multiple logos, and the earn-page context auto-select effect drops ref tracking.
Validator selection and summary tests
packages/widget/tests/pages-dashboard/provider-selection-card.test.tsx, packages/widget/tests/pages-dashboard/earn-details-model.test.tsx, packages/widget/tests/components/select-validator-section.test.tsx
The dashboard and widget tests now cover multi-validator provider names, provider-card removal and manage actions, the updated validator selector modal behavior, and the new yield-summary rendering rules.

Test and build infrastructure

Layer / File(s) Summary
Shared mock delay and MSW routing
packages/widget/tests/mocks/delay.ts, packages/widget/tests/mocks/handlers.ts, packages/widget/tests/mocks/*-api-handlers.ts
mockDelay is added for MSW handlers, the catch-all handler now allows stake and yield API origins before returning 204, and the API mock handlers use mockDelay() instead of inline delays.
Use-case test setup delay migration
packages/widget/tests/use-cases/*/setup.ts, packages/widget/tests/use-cases/*.test.tsx
Use-case setups switch from delay() to mockDelay() across deep-links, external-provider, gas-warning, initial-page, RWA KYC, select-opportunity, sk-wallet, staking-flow, and trust-incentive-apy flows; sk-wallet also changes the Ton readiness assertion.
Global test setup and workspace updates
packages/widget/tests/utils/setup.ts, pnpm-workspace.yaml
tests/utils/setup.ts disables Motion animations during tests, and pnpm-workspace.yaml updates catalog versions for biome, commitlint, ledgerhq, React, Vite, Vitest, Playwright, Next, and related tooling.
Vite node-polyfills configuration
packages/widget/vite/vite.config.base.ts, package.json
vite.config.base.ts now calls nodePolyfills() directly, updates optimizeDeps.include, removes the satisfies UserConfig wrapper, and package.json drops the vite-plugin-node-polyfills patch entry.

Sequence Diagram(s)

sequenceDiagram
  participant ProviderSelectionCard
  participant getProviderCardItems
  participant ProviderCardsTrigger
  participant SelectValidator

  ProviderSelectionCard->>getProviderCardItems: providerDetailsArr, selectedValidatorsArr, yieldDto
  getProviderCardItems-->>ProviderSelectionCard: ProviderCardItem[]
  ProviderSelectionCard->>ProviderCardsTrigger: items, multiSelect, onRemoveValidator, tokenSymbol
  ProviderCardsTrigger->>SelectValidator: open selector / manage validators
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • stakekit/widget#520: Modifies the same SelectValidator component and its view-more / pagination flow.
  • stakekit/widget#525: Touches the same ProviderSelectionCard and earn-details-formatters flow in the dashboard earn-details area.
  • stakekit/widget#527: Changes the same earn-page-context.tsx area while updating validator selection state handling.

Suggested reviewers

  • jdomingos
  • Philippoes
  • dnehl

Poem

🐰 Hop hop, the validators line up in a row,
Chips and cards now sparkle in a tidy glow.
mockDelay hums softly, tests leap with delight,
And multi-select summaries shine clear and bright.
This rabbit gives a whisker-twitch cheer—
A cozy little refactor has appeared! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change set: multi-validator provider cards and validator-selection fixes.
Description check ✅ Passed The description covers both added features and changes, though it does not use the template headings exactly and ends with an incomplete section marker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/misc

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.23.0)
packages/widget/tests/mocks/handlers.ts

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

[00.34][ERROR]: unable to find a config; path .coderabbit-opengrep-fallback.yml does not exist

packages/widget/tests/mocks/yield-api-handlers.ts

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

[00.14][ERROR]: unable to find a config; path .coderabbit-opengrep-fallback.yml does not exist

packages/widget/tests/mocks/legacy-api-handlers.ts

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

[00.35][ERROR]: unable to find a config; path .coderabbit-opengrep-fallback.yml does not exist

  • 15 others

Comment @coderabbitai help to get the list of available commands.

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-547.df4xyoi0xyeak.amplifyapp.com

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-547.d2ribjy8evqo6h.amplifyapp.com

@socket-security

socket-security Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @emnapi/runtime is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/next@16.2.9npm/@emnapi/runtime@1.11.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm js-yaml is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/@commitlint/cli@21.0.2npm/js-yaml@4.2.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/js-yaml@4.2.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm vite-plugin-node-polyfills is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: packages/widget/package.jsonnpm/vite-plugin-node-polyfills@0.28.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite-plugin-node-polyfills@0.28.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm yargs is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/@cosmos-kit/keplr@2.17.1npm/@cosmos-kit/core@2.18.1npm/@cosmos-kit/walletconnect@2.15.1npm/@luno-kit/core@0.0.13npm/@tronweb3/tronwallet-adapter-walletconnect@3.0.3npm/@solana/wallet-adapter-wallets@0.19.38npm/react-i18next@17.0.7npm/wagmi@3.6.14npm/@solana/wallet-adapter-react@0.15.39npm/yargs@17.7.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/yargs@17.7.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Publisher changed: npm yargs is now published by shadowspawn

Author: shadowspawn

From: pnpm-lock.yamlnpm/@cosmos-kit/keplr@2.17.1npm/@cosmos-kit/core@2.18.1npm/@cosmos-kit/walletconnect@2.15.1npm/@luno-kit/core@0.0.13npm/@tronweb3/tronwallet-adapter-walletconnect@3.0.3npm/@solana/wallet-adapter-wallets@0.19.38npm/react-i18next@17.0.7npm/wagmi@3.6.14npm/@solana/wallet-adapter-react@0.15.39npm/yargs@17.7.3

ℹ Read more on: This package | This alert | What is unstable ownership?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/yargs@17.7.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm @rev-dep/darwin-arm64

Location: Package overview

From: pnpm-lock.yamlnpm/rev-dep@2.15.0npm/@rev-dep/darwin-arm64@2.15.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@rev-dep/darwin-arm64@2.15.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm @rev-dep/linux-x64

Location: Package overview

From: pnpm-lock.yamlnpm/rev-dep@2.15.0npm/@rev-dep/linux-x64@2.15.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@rev-dep/linux-x64@2.15.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm rev-dep

Location: Package overview

From: package.jsonnpm/rev-dep@2.15.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/rev-dep@2.15.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/widget/vite/vite.config.base.ts (1)

88-88: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Dropping satisfies UserConfig removes a useful type guard.

Removing the satisfies UserConfig wrapper means the returned config object is no longer structurally type-checked against UserConfig, so typos or invalid keys (e.g. in optimizeDeps, test, or build) will silently pass. If merge(...) widens the type such that satisfies no longer compiles, consider keeping the constraint on the literal config object instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/widget/vite/vite.config.base.ts` at line 88, The Vite config
returned by the config builder in vite.config.base.ts should keep structural
validation against UserConfig, because removing the satisfies UserConfig check
allows invalid or misspelled options to slip through. Update the config object
around the merge(...) return so it is still checked against UserConfig, ideally
by constraining the literal config object itself or otherwise preserving the
satisfies UserConfig guard while keeping the inferred type usable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx`:
- Around line 163-169: The remove-button aria label in
provider-selection-card.tsx is hardcoded English copy, so it needs to be moved
into i18n with interpolation for the validator name. Update the Box aria-label
to use the shared translation helper, add the new translation key in both
packages/widget/src/translation/English/translations.json and
packages/widget/src/translation/French/translations.json, and apply the same
localization pattern in select-validator-trigger.tsx where the same label is
used.

In
`@packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx`:
- Line 218: The provider logo list is being truncated to a single item in
select-yield-reward-details.tsx, so the rendering loop cannot show multiple
logos for multi-select cases. Update displayedProviders to preserve the full
selected providers collection instead of wrapping only firstProvider, and make
sure the mapping logic that renders the provider logos continues to work with
the complete array in the select-yield-reward-details component.

---

Nitpick comments:
In `@packages/widget/vite/vite.config.base.ts`:
- Line 88: The Vite config returned by the config builder in vite.config.base.ts
should keep structural validation against UserConfig, because removing the
satisfies UserConfig check allows invalid or misspelled options to slip through.
Update the config object around the merge(...) return so it is still checked
against UserConfig, ideally by constraining the literal config object itself or
otherwise preserving the satisfies UserConfig guard while keeping the inferred
type usable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a3b0b49e-b97b-42e9-af96-551472c32835

📥 Commits

Reviewing files that changed from the base of the PR and between 2de9c9f and 7a6891d.

⛔ Files ignored due to path filters (7)
  • packages/examples/with-vite-bundled/public/vite.svg is excluded by !**/*.svg
  • packages/examples/with-vite-bundled/src/typescript.svg is excluded by !**/*.svg
  • packages/widget/src/assets/images/porto.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/bitgo.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/finoa.svg is excluded by !**/*.svg
  • packages/widget/src/providers/ethereum/finery-wallet-list/custom-wallet-icons/utila.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (36)
  • package.json
  • packages/widget/src/components/atoms/virtual-list/index.tsx
  • packages/widget/src/components/molecules/select-validator/index.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-formatters.ts
  • packages/widget/src/pages-dashboard/overview/earn-details/earn-details-model.tsx
  • packages/widget/src/pages-dashboard/overview/earn-details/styles.css.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/styles.css.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-section.tsx
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-trigger.tsx
  • packages/widget/src/pages/details/earn-page/components/select-validator-section/select-validator-trigger.tsx
  • packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx
  • packages/widget/src/pages/details/earn-page/styles.css.ts
  • packages/widget/src/translation/English/translations.json
  • packages/widget/src/translation/French/translations.json
  • packages/widget/tests/components/select-validator-section.test.tsx
  • packages/widget/tests/mocks/delay.ts
  • packages/widget/tests/mocks/external-api-handlers.ts
  • packages/widget/tests/mocks/handlers.ts
  • packages/widget/tests/mocks/legacy-api-handlers.ts
  • packages/widget/tests/mocks/yield-api-handlers.ts
  • packages/widget/tests/pages-dashboard/earn-details-model.test.tsx
  • packages/widget/tests/pages-dashboard/provider-selection-card.test.tsx
  • packages/widget/tests/use-cases/deep-links-flow/setup.ts
  • packages/widget/tests/use-cases/external-provider/setup.ts
  • packages/widget/tests/use-cases/gas-warning-flow/setup.ts
  • packages/widget/tests/use-cases/renders-initial-page.test.tsx
  • packages/widget/tests/use-cases/rwa-kyc-flow.test.tsx
  • packages/widget/tests/use-cases/select-opportunity.test.tsx
  • packages/widget/tests/use-cases/sk-wallet.test.tsx
  • packages/widget/tests/use-cases/staking-flow/setup.ts
  • packages/widget/tests/use-cases/trust-incentive-apy/setup.ts
  • packages/widget/tests/utils/setup.ts
  • packages/widget/vite/vite.config.base.ts
  • packages/widget/vite/vite.node-polyfills.ts
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (4)
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-trigger.tsx
  • packages/widget/vite/vite.node-polyfills.ts
  • packages/widget/src/pages-dashboard/overview/earn-page/utila-select-validator-section.tsx
  • packages/widget/src/pages-dashboard/overview/earn-page/styles.css.ts

Comment on lines +163 to +169
{removableValidator ? (
<Box
aria-label={`Remove ${item.name}`}
as="button"
className={styles.providerRemoveButton}
onClick={() => onRemoveValidator(removableValidator)}
type="button"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the remove-button label.

aria-label={Remove ${item.name}} introduces new user-facing copy in English only, so screen-reader output will stay untranslated here (and the same new label pattern exists in select-validator-trigger.tsx). Please move this to i18n with interpolation and add the key to both locale files. As per coding guidelines, "When changing user-facing copy, update both packages/widget/src/translation/English/translations.json and packages/widget/src/translation/French/translations.json."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/widget/src/pages-dashboard/overview/earn-details/components/provider-selection-card.tsx`
around lines 163 - 169, The remove-button aria label in
provider-selection-card.tsx is hardcoded English copy, so it needs to be moved
into i18n with interpolation for the validator name. Update the Box aria-label
to use the shared translation helper, add the new translation key in both
packages/widget/src/translation/English/translations.json and
packages/widget/src/translation/French/translations.json, and apply the same
localization pattern in select-validator-trigger.tsx where the same label is
used.

Source: Coding guidelines

providerName: firstProvider.name,
})
: (firstProvider?.name ?? "");
const displayedProviders = firstProvider ? [firstProvider] : [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Only the first provider logo is ever rendered.

At Line 218, displayedProviders is reduced to [firstProvider], so the map at Lines 247-255 can never show multiple logos for multi-select cases.

Suggested fix
-  const displayedProviders = firstProvider ? [firstProvider] : [];
+  const displayedProviders = providers;

Also applies to: 247-255

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/widget/src/pages/details/earn-page/components/select-yield-section/select-yield-reward-details.tsx`
at line 218, The provider logo list is being truncated to a single item in
select-yield-reward-details.tsx, so the rendering loop cannot show multiple
logos for multi-select cases. Update displayedProviders to preserve the full
selected providers collection instead of wrapping only firstProvider, and make
sure the mapping logic that renders the provider logos continues to work with
the complete array in the select-yield-reward-details component.

@petar-omni petar-omni force-pushed the fix/misc branch 2 times, most recently from 336d995 to 44b2841 Compare June 24, 2026 21:12
0xcacti
0xcacti previously approved these changes Jun 24, 2026
dnehl
dnehl previously approved these changes Jun 24, 2026

@dnehl dnehl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing spotted - just one thing no linear issue is connected

…tails

Show every selected validator in the provider selection card, with per-validator
remove controls and a manage validators entry point for multi-select yields.
Localize provider status labels, align preferred badge styling with theme tokens,
and remove the utila-specific dashboard validator section.

Fix multi-select validator list pagination by separating expanded display from
explicit load-more requests so the View all action works when only preferred
validators are shown.

Stabilize browser tests with a fixed mock response delay and disabled animations.
Update the node polyfill plugin setup to match current package behavior.

Refresh catalog-managed dependency versions and the lockfile.
@petar-omni petar-omni dismissed stale reviews from dnehl and 0xcacti via 3f679c0 June 25, 2026 08:39
@petar-omni petar-omni merged commit bc3a842 into main Jun 25, 2026
8 checks passed
@petar-omni petar-omni deleted the fix/misc branch June 25, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants